/* 
 * File:   SocketException.cpp
 * Author: jacek
 * 
 * Created on 14 kwiecień 2011, 22:33
 */

#include "include/SocketException.h"
#include "include/Socket.h"
namespace Net {
SocketException::SocketException() {
}
SocketException::SocketException(int errnum) {
	buffor << strerror(errnum);
	errno = 0;
}

SocketException::SocketException(const char* text) {
	buffor << text;
}
SocketException::SocketException(const SocketException& orig) {
	buffor << orig.buffor.str();
}

SocketException::~SocketException() {
}

string SocketException::GetMessage() {
	return buffor.str() + "\n";
}
SocketException& SocketException::operator<<(SocketException& src) {
	buffor << src.buffor.str();
	return *this;
}
SocketException& SocketException::operator<<(string src) {
	buffor << src;
	return *this;
}
SocketException& SocketException::operator<<(int src) {
	buffor << src;
	return *this;
}
SocketException& SocketException::operator<<(char* src) {
	buffor << src;
	return *this;
}
}
